//
//  XBridge+methods.m
//  liBaQiang
//
//  Created by 奇林刘 on 2018/10/11.
//  Copyright © 2018年 liu. All rights reserved.
//

#import "XBridge+methods.h"

#define WebView ((XBridgeWebView *)[self valueForKey:@"managingWebView"])
#define ReceivedMessageBody [self valueForKey:@"_receivedMessageBody"]
#define CurrentVC ((UIViewController *)[self performSelector:NSSelectorFromString(@"getCurrentVC")])

@implementation XBridge (methods)

- (void)popViewController {
    NSLog(@"\n【执行来自Web的请求:popViewController】\n");
    [CurrentVC.navigationController popViewControllerAnimated:YES];
}

- (void)setNavigationTitle {
    NSLog(@"\n【执行来自Web的请求:setNavigationTitle】\n");
    CurrentVC.title = ReceivedMessageBody[@"params"];
}

- (void)test {
    NSLog(@"\n【执行来自Web的请求:test】\n");
}

@end
